//
//  RegisterView.m
//  UI-21-豆豆豆瓣
//
//  Created by dllo on 15/11/7.
//  Copyright © 2015年 Wang Hao. All rights reserved.
//

#import "RegisterView.h"

@implementation RegisterView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (void)dealloc
{
    [_aLabel release];
    [_bLabel release];
    [_cLabel release];
    [_dLabel release];
    [_eLabel release];
    [_aText release];
    [_bText release];
    [_cText release];
    [_dText release];
    [_eText release];
    [super dealloc];
}

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self){
        [self createSubs];
    }
    
    return self;
    
}
-(void)createSubs{
    
    self.aLabel = [[UILabel alloc] initWithFrame:CGRectMake(40, 80, 80, 40)];
    self.aLabel.backgroundColor = [UIColor clearColor];
    [self addSubview:self.aLabel];
    self.aLabel.text = @"用户名";
    self.aLabel.textColor = [UIColor blackColor];
    self.aLabel.textAlignment = NSTextAlignmentCenter;
    //self.aLabel.font = [UIFont boldSystemFontOfSize:20];
    [self.aLabel sizeToFit];
    [_aLabel release];
    
    self.bLabel = [[UILabel alloc] initWithFrame:CGRectMake(40, 160, 80, 40)];
    self.bLabel.backgroundColor = [UIColor clearColor];
    [self addSubview:self.bLabel];
    self.bLabel.text = @"确认密码";
    self.bLabel.textColor = [UIColor blackColor];
    //self.bLabel.font = [UIFont boldSystemFontOfSize:20];
    self.bLabel.textAlignment = NSTextAlignmentCenter;
    [self.bLabel sizeToFit];
    [_bLabel release];
    
    
    self.cLabel = [[UILabel alloc] initWithFrame:CGRectMake(40, 120, 80, 40)];
    self.cLabel.backgroundColor = [UIColor clearColor];
    [self addSubview:self.cLabel];
    self.cLabel.text = @"密码";
    self.cLabel.textColor = [UIColor blackColor];
    self.cLabel.textAlignment = NSTextAlignmentCenter;
    //self.cLabel.font = [UIFont boldSystemFontOfSize:20];
    [self.cLabel sizeToFit];
    [_cLabel release];
    
    self.dLabel = [[UILabel alloc] initWithFrame:CGRectMake(40, 200, 80, 40)];
    self.dLabel.backgroundColor = [UIColor clearColor];
    [self addSubview:self.dLabel];
    self.dLabel.text = @"手机号";
    self.dLabel.textColor = [UIColor blackColor];
    //self.dLabel.font = [UIFont boldSystemFontOfSize:20];
    self.dLabel.textAlignment = NSTextAlignmentCenter;
    [self.dLabel sizeToFit];
    [_dLabel release];
    
    self.eLabel = [[UILabel alloc] initWithFrame:CGRectMake(40, 240, 80, 40)];
    self.eLabel.backgroundColor = [UIColor clearColor];
    self.eLabel.text = @"邮箱";
    [self addSubview:self.eLabel];
    self.eLabel.textColor = [UIColor blackColor];
    self.eLabel.textAlignment = NSTextAlignmentCenter;
    //self.eLabel.font = [UIFont boldSystemFontOfSize:20];
    [self.eLabel sizeToFit];
    [_eLabel release];
    
    
    self.aText = [[UITextField alloc] initWithFrame:CGRectMake(140, 120, 150, 30)];
    [self addSubview:self.aText];
    self.aText.placeholder = @"请输入密码";
    self.aText.borderStyle = UITextBorderStyleRoundedRect;//设置边框样式
    [_aText release];
    
    self.bText = [[UITextField alloc] initWithFrame:CGRectMake(140, 80, 150, 30)];
    [self addSubview:self.bText];
    self.bText.placeholder = @"请输入用户名";
    self.bText.borderStyle = UITextBorderStyleRoundedRect;
    [_bText release];
    
    self.cText = [[UITextField alloc] initWithFrame:CGRectMake(140, 160, 150, 30)];
    [self addSubview:self.cText];
    self.cText.placeholder = @"再次输入密码";
    self.cText.borderStyle = UITextBorderStyleRoundedRect;
    [_cText release];
    
    self.dText = [[UITextField alloc] initWithFrame:CGRectMake(140, 200, 150, 30)];
    [self addSubview:self.dText];
    self.dText.placeholder = @"请输联系方式";
    self.dText.borderStyle = UITextBorderStyleRoundedRect;
    [_dText release];
    
    self.eText = [[UITextField alloc] initWithFrame:CGRectMake(140, 240, 150, 30)];
    self.eText.borderStyle = UITextBorderStyleRoundedRect;
    [self addSubview:self.eText];
    self.eText.placeholder = @"请输入邮箱";
    [_eText release];
    
    
    
    
}

@end
